package controllers

import (
	"github.com/goravel/framework/contracts/http"
	httpfacades "github.com/hulutech-web/http_result"
	"goravel/app/models"
)

type UserController struct {
	// Dependent services
}

func NewUserController() *UserController {
	return &UserController{
		// Inject services
	}
}

func (r *UserController) Index(ctx http.Context) http.Response {
	emps := []models.User{}
	queries := ctx.Request().Queries()
	result, _ := httpfacades.NewResult(ctx).SearchByParams(queries, map[string]interface{}{}, []string{}...).ResultPagination(&emps, []string{"Dept"}...)
	return result
}

func (r *UserController) Show(ctx http.Context) http.Response {
	return nil
}

func (r *UserController) Store(ctx http.Context) http.Response {
	return nil
}

func (r *UserController) Update(ctx http.Context) http.Response {
	return nil
}

func (r *UserController) Destroy(ctx http.Context) http.Response {
	return nil
}
